<template>
	<view>
		<view>
			<!-- 页面内容 -->

			<!-- 返回按钮 -->
			<view class="back-button" @click="navigateBack">
				<text class="cuIcon-back"></text>
			</view>
		</view>

		<view style="margin-top: 10vh;">
			<!-- 这里是竖直滑动布局的头 -->
			<scroll-view scroll-y="true" class="scroll-Y" @touchmove.stop :style="{
				'height': '90vh',
				}">

				<!-- 以下是水平布局 -->
				<view v-for="item in array" class="scroll-view-item_X" :style="{
						'margin':'15rpx',
						'border-radius': '15rpx',
						'height':'18vh',
						'box-shadow':'0 0 4px rgba(95, 95, 95, 0.5)',
						'display':'flex',
						}">

					<image :src='item.content' :style="{
							'border-radius':'10rpx',
							'margin-right':'1%',
							'top':'5%',
							'margin-left':'1%',
							'height': '90%' ,
							'width': 'auto',
							'aspect-ratio': '1',
							}">
					</image>

					<view :style="{
							'line-height': '12rpx'
							}">
						<view :style="{
								'margin-top': '27rpx',
								'font-size': '40rpx'
								}">
							{{item.des}}
						</view>
						<view :style="{
								'margin-top': '30rpx',
								'font-size': '30rpx'
								}">
							预约人数：{{item.personNum}}
						</view>
						<view :style="{
								'margin-top': '30rpx',
								'font-size': '30rpx'
								}">
							预约时间：{{item.date}}
						</view>
						<view :style="{
								'margin-top': '30rpx',
								'font-size': '30rpx'
								}">
							球队类型：{{item.type}}
						</view>
						<view :style="{
								'margin-top': '30rpx',
								'font-size': '30rpx',
								'color': '#909399'
								}">
							距离：{{item.len}}km
						</view>
					</view>

				</view>

			</scroll-view>
		</view>

	</view>
</template>

<script>
	import orderData from "../index/appointment.vue"

	export default {
		data() {
			return {
				array: orderData.getOrderData(),
			}
		},
		methods: {
			navigateBack() {
				uni.navigateBack();
			},
		}
	}
</script>

<style>
	.back-button {
		position: fixed;
		top: 20rpx;
		left: 20rpx;
		width: 100rpx;
		height: 100rpx;
		background-color: #FFFFFF;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #000000;
		font-size: 40rpx;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	}

	.scroll-view-item_H {

		width: 100%;

		text-align: center;
		font-size: 36rpx;
	}
</style>